<template>
	<view class="flex align-center">
		<view class="py-10 flex" @click="agree">
			<view class="w-20 h-20 flex">
				<text class="iconfont text-18" :class="{ 'icon-success-circle primary': modelValue, 'agreement-border w-16 h-16 radius-circle': !modelValue }"></text>
			</view>
			<text class="pl-5 gray8">我已阅读并同意</text>
		</view>
		<text
			class="primary"
			@click="
				routerPush('/pages/common/web-view/web-view', {
					title: '媄众隐私政策',
					url: 'https://www.beautymz.com/h5/xy_yszc.html'
				})
			"
		>
			《媄众隐私协议》
		</text>
	</view>
</template>
<script setup lang="ts">
import { routerPush } from '@/assets/js/utils'

const props = defineProps({
	modelValue: {}
})

//修改双向绑定值
const emit = defineEmits(['update:modelValue'])
const agree = () => {
	emit('update:modelValue', !props.modelValue)
}
</script>

<style lang="scss">
.agreement-border {
	border: 1rpx solid #cccccc;
}
</style>
